<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<%@ taglib prefix="sec"
	uri="http://www.springframework.org/security/tags"%>

<s:include value="../header.jsp"></s:include>
<s:include value="../leftNav.jsp"></s:include>

<div id="content">

<div id="tabs">
	<ul>
		<li><s:a href="#tabs-1" action="testActionJsp.action">Me meetings list</s:a></li>
	</ul>
	<div id="tabs-1">
		<s:if test="meetings.size > 0">
			<table id="meetings">
				<tr style="background-color: highlight;">
					<td>id</td>
					<td>Title</td>
					<td>Leading</td>
					<td>Date</td>
					<td>Time</td>
					<td>Duration</td>
					<td>Place</td>
				</tr>
				<s:iterator value="meetings" status="meetingsStatus">
					<s:if test="#meetingsStatus.even == true">
						<tr style="background-color: silver;">
							<s:url id="editMeeting" value="editMeetingForm.action">
									<s:param name="editMeetingForm" value="true" />
									<s:param name="meetingId" value="meetingId" />
							</s:url>
							<td>
								<s:a href="%{editMeeting}">
									<s:property value="meetingId" />
								</s:a>
							</td>
							<td>
								<s:a href="%{editMeeting}">
									<s:property value="title" />
								</s:a>
							</td>
							<td><s:property value="leading"/></td>
							<td><s:property value="meetingDate"/></td>
							<td><s:property value="meetingTime"/></td>
							<td><s:property value="duration"/></td>
							<td><s:property value="place"/></td>
							<td><s:url id="deleteMeeting" value="deleteMeeting.action">
								<s:param name="meetingId" value="meetingId" />
							</s:url> <s:a href="%{deleteMeeting}">Delete</s:a></td>
						</tr>
					</s:if>
					<s:else>
						<tr style="background-color: threedhighlight;">
							<s:url id="editMeeting" value="editMeetingForm.action">
									<s:param name="editMeetingForm" value="true" />
									<s:param name="meetingId" value="meetingId" />
							</s:url>
							<td>
								<s:a href="%{editMeeting}">
									<s:property value="meetingId" />
								</s:a>
							</td>
							<td>
								<s:a href="%{editMeeting}">
									<s:property value="title" />
								</s:a>
							</td>
							<td><s:property value="leading"/></td>
							<td><s:property value="meetingDate"/></td>
							<td><s:property value="meetingTime"/></td>
							<td><s:property value="duration"/></td>
							<td><s:property value="place"/></td>
							<td><s:url id="deleteMeeting" value="deleteMeeting.action">
								<s:param name="meetingId" value="meetingId" />
							</s:url> <s:a href="%{deleteMeeting}">Delete</s:a></td>
						</tr>
					</s:else>
				</s:iterator>
			</table>
		</s:if>
		<s:else>
			You do not have a meeting set yet.
		</s:else>
	</div>
</div>